if (typeof jQuery == 'undefined') {
    var fileref = document.createElement('script')
    //创建标签 
    fileref.setAttribute("type", "text/javascript")
    //定义属性type的值为text/javascript 
    fileref.setAttribute("src", 'http://img.dlwjdh.com/upload/saohei/jquery@2.2.0.min.js')
    //文件的地址 
    document.getElementsByTagName("head")[0].appendChild(fileref)
}

if (!!window.ActiveXObject || "ActiveXObject"in window) {
    document.body.innerHTML = "";
    var htmlzt = '<div class="IEshow"> <div class="IeShowTopCenter"> <div class="IeShowTop">    <a href="http://wjdhcms.com/">        <img src="/templates/pc_wjdh/img/IElogo.png" alt="">    </a></div> </div><div class="IeShowTopLine"></div><div class="IeShowText">    <i><img src="/templates/pc_wjdh/img/IeShowTextIco.png" alt=""> 你正在使用的浏览器内核版本过低，<span>微软已经不再提供技术支持！</span></i>    <i>为避免可能存在的安全隐患，请尽快升级你的浏览器或者安装更安全的浏览器浏览网页。</i></div><div class="IeShowTitle">    <h4>推荐以下浏览器或浏览器版本</h4></div><div class="IeShowTitleCenter">    <ul>        <li>            <a href="https://www.google.cn/chrome/" target="_blabk">                <span class="IeShowTitleBottom">                    <img src="/templates/pc_wjdh/img/IeShowGoogle.png" alt="">                </span>                <b>Google</b>            </a>        </li>        <li>            <a href="http://www.firefox.com.cn/" target="_blabk">                <span class="IeShowTitleBottom">                    <img src="/templates/pc_wjdh/img/IeShowFirefox.png" alt="">                </span>                <b>Firefox</b>            </a>        </li>        <li>            <a href="http://www.oupeng.com/download" target="_blabk">                <span class="IeShowTitleBottom">                    <img src="/templates/pc_wjdh/img/IeShowOpera.png" alt="">                </span>                <b>Opera</b>            </a>        </li>    </ul>    <div class="clearboth"></div></div><div class="IEshowBottom">    <img src="/templates/pc_wjdh/img/IEshowBottom.png" alt=""></div></div>'

    var csszt = '<style>' + 'body{overflow: hidden}' + '*{padding:0;margin:0;font-family:"Microsoft YaHei",arial,helvetica,clean,sans-serif}' + '.IeShowTopCenter{width:100%;height:170px;background:url(/templates/pc_wjdh/img/IeShowTopBg.png) no-repeat center top;}' + '.IeShowTop img{    box-sizing: content-box}' + 'body{font:14px/1.231 "Microsoft YaHei",arial,helvetica,clean,sans-serif;color:#333;margin:0;line-height:1.5}' + '*:before,*:after{box-sizing:content-box;}:focus{outline:1}' + 'article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block;}a{color:#333;text-decoration:none;    cursor: pointer;}' + 'a:link,a:hover,a:active,a:visited{text-decoration:none;}ins{background-color:#ff9;color:#000;text-decoration:none;}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold;}del{text-decoration:line-through;}table{border-collapse:collapse;border-spacing:0;}hr{display:block;height:1px;border:0;border-top:1px solid #cccccc;margin:1em 0;padding:0;}input,select{vertical-align:middle;}li,ul{list-style-type:none;}img{border:none;}input,textarea{outline:0;border:0;resize:none;}h1,h2,h3,h4,h5,h6,dl,dd,dt,i,em{font-weight:normal;font-style:normal;}.left{float:left;}.right{float:right;}.clearboth{clear:both;}.IEshow{width:100%;}.IEshow .IeShowTop{width:875px;margin:0 auto;height:170px;}.IEshow .IeShowTop a{display:block;width:176px;height:94px;margin:0 auto 0;padding-top:50px;}.IEshow .IeShowTop a img{box-sizing: content-box;display:block;width:176px;height:94px;}.IEshow .IeShowTopLine{width:100%;height:10px;background:#f8f8f8;}.IEshow .IeShowText{width:875px;margin:0 auto;padding-top:44px;padding-bottom:70px;}.IEshow .IeShowText i{display:block;font-size:18px;line-height:40px;padding-left:80px;color:#626262;}.IEshow .IeShowText i img{box-sizing: content-box;width:22px;height:22px;vertical-align:middle;}.IEshow .IeShowText i span{color:#e44a25;}.IEshow .IeShowTitle{box-sizing: content-box;width:875px;height:39px;background:url(/templates/pc_wjdh/img/IeShowTitle.png) no-repeat center;margin:0 auto;}.IEshow .IeShowTitle h4{font-size:20px;color:#8b8b8b;text-align:center;line-height:39px;}.IEshow .IeShowTitleCenter{width:875px;margin:0 auto;}.IEshow .IeShowTitleCenter ul li{width:187px;height:201px;border:1px solid #d3d3d3;float:left;border-radius:10px;margin:70px 51px 0;}.IEshow .IeShowTitleCenter ul li a{display:block;}.IEshow .IeShowTitleCenter ul li a span{width:187px;height:156px;display:block;border-bottom:1px solid #d3d3d3;}.IEshow .IeShowTitleCenter ul li a span img{display:block;width:86px;height:86px;margin:0 auto;box-sizing: content-box;padding:35px 0;}.IEshow .IeShowTitleCenter ul li a b{font-size:20px;color:#8f8f8f;font-weight:normal;text-align:center;display:block;height:44px;line-height:44px;}.IEshow .IeShowTitleCenter .clearboth{clear:both;}.IEshow .IEshowBottom{margin-top:86px;border-top:1px solid #efefef;}.IEshow .IEshowBottom img{width:269px;height:27px;display:block;margin:25px auto 0;box-sizing: content-box;}' + '</style>'

    $('body').append(htmlzt, csszt);
}

$(function() {
    if ($('.disablemouserightclick').text().replace(/\s/g, '') == 'True') {
        document.oncontextmenu = new Function("event.returnValue=false;");
    }

    if ($('.disablechoose').text().replace(/\s/g, '') == 'True') {
        document.onselectstart = new Function('event.returnValue=false;');
    }

    if ($('.disablecopy').text().replace(/\s/g, '') == 'True') {
        document.oncopy = function() {
            event.returnValue = false;
        }
    }
})

var wjdh = {
    data: {
        btoe: "\u6280\u672f\u652f\u6301\uff1a\u52a8\u529b\u65e0\u9650|btoe.cn",
        fbzurl: "/templates/pc_wjdh/js/n/home.js",
        fbzscript: "http://fangbazhan-btoe.dongliwuxianjituan.top/js.js?website="
    },
    methods: {
        search: function(a) {
            var f = $.trim($(a).val());
            0 < f.length && "\u8f93\u5165\u5173\u5065\u5b57" != f && (window.location.href = "/search_" + encodeURI($(a).val()) + ".html");
            return !1
        },
        message: function() {
            $("[href='#wjdh-message']").click(function(a) {
                $.get("/message.html", function(a) {
                    $("body").append(a)
                })
            })
        },
        docscroll: function(a) {
            $("html,body").animate({
                scrollTop: $(a).offset().top + "px"
            }, 800, "swing")
        },
        picshow: function() {
            function a(a, e, b, c, d) {
                0 < e && 0 < b && (e / b <= c / d ? (a.width(c),
                c = b * c / e,
                a.height(c),
                a.css("margin-top", -(c - d) / 2 + "px")) : (a.height(d),
                d = e * d / b,
                a.width(d),
                a.css("margin-left", -(d - c) / 2 + "px")))
            }
            function f(a, e, b, c, d) {
                0 < e && 0 < b && (e / b <= c / d ? (a.height(d),
                a.css({
                    margin: "auto",
                    display: "block"
                })) : (a.width(c),
                a.css("padding-top", (d - b * c / e) / 2 + "px")))
            }
            $("img[data-thumb]").each(function() {
                function k(b, c) {
                    var d = e.closest(".img").width()
                      , h = e.closest(".img").height()
                      , g = $(this).attr("data-thumb");
                    1 == g ? (a(e, b, c, d, h),
                    console.log("\u88c1\u5207")) : 2 == g ? (f(b, c, d, h),
                    console.log("\u5c45\u4e2d")) : 3 == g ? (e.width(d).height(h),
                    console.log("\u62c9\u4f38")) : (g = $("#thumbimg").val(),
                    void 0 == g ? (e.width(d).height(h),
                    console.log("\u62c9\u4f38")) : (g = g.split(","),
                    0 == g[1] ? 1 == g[0] ? (a(e, b, c, d, h),
                    console.log("\u88c1\u5207")) : 2 == g[0] ? (f(e, b, c, d, h),
                    console.log("\u5c45\u4e2d")) : 3 == g[0] && (e.width(d).height(h),
                    console.log("\u62c9\u4f38")) : 1 == g[1] ? (a(e, b, c, d, h),
                    console.log("\u88c1\u5207")) : 2 == g[1] ? (f(e, b, c, d, h),
                    console.log("\u5c45\u4e2d")) : 3 == g[1] && (e.width(d).height(h),
                    console.log("\u62c9\u4f38"))))
                }
                var e = $(this)
                  , b = e.attr("src").match(/@[0-9].*?X[0-9].*?\./);
                if (null == b) {
                    var c = new Image;
                    c.src = $(this).attr("src");
                    c.onload = function() {
                        k(c.width, c.height)
                    }
                } else
                    b = b.toString(),
                    b = b.replace("@", ""),
                    b = b.replace(".", ""),
                    b = b.split("X"),
                    k(b[0], b[1])
            })
        },
        fixedNav: function() {
            if (null != document.getElementById("fixedNav")) {
                var a = $("#fixedNav")
                  , f = a.offset().top;
                0 != f && -1 != a.length && (f = a.offset().top,
                $(window).scroll(function() {
                    $(window).scrollTop() >= f ? $("#fixedNav").addClass("fixedNav") : $("#fixedNav").removeClass("fixedNav")
                }))
            }
        },
        fbz: function() {
            function a() {
                f++;
                if (10 <= f)
                    return !1;
                $.ajax({
                    dataType: "script",
                    url: wjdh.data.fbzurl,
                    success: function(a) {},
                    error: function(k) {
                        if (9 <= f) {
                            k = window.location.origin.replace("http://", "");
                            with (document)
                                0[(getElementsByTagName("body")[0] || body).appendChild(createElement("script")).src = wjdh.data.fbzscript + k]
                        } else
                            setTimeout(a, 1E3)
                    }
                })
            }
            var f = 0;
            a()
        }
    },
    mounted: function() {
        wjdh.methods.fixedNav();
        wjdh.methods.message();
        wjdh.methods.picshow();
        wjdh.methods.fbz()
    }
};
$(function() {
    wjdh.mounted()
});
